<?php
/** @var ContentController $this */
/** @var Channel $channel */

$channel = $this->getChannel();
$this->pageTitle = $channel->title;
?>

<div class="content-dashboard row-fluid">
	<div class="span2">
		<?php
		$this->beginWidget('bootstrap.widgets.TbBox', array(
			'title' => '栏目' . CHtml::link('管理', array('/channel/index')),
		));
		?>
		<?php
		$items = Channel::model()->getContentMenuItems();
		$this->widget('YJsTreeWidget', array(
			'items' => $items,
			'htmlOptions' => array('class' => 'channel-tree', 'id' => 'channel-tree'),
			'selected' => $channel->id,
			/*
			'options' => array(
				'core' => array(
					'animation' => 0,
					'check_callback' => true,
				),
				'types' => array(

				),
				'plugins' => array("dnd", "types",  "wholerow"),
			)*/
		));
		?>
		<?php $this->endWidget() ?>
	</div>

	<div class="span10">
		<div class="content-render-container" id="content-reader-container">
			<div class="page-header">
				<h1><?php echo $this->pageTitle; ?> <?php echo CHtml::link('创建' . $channel->getBundleName(), array('create', 'channel_id' => $channel->id), array('class' => 'btn btn-link')); ?></h1>
			</div>
			<?php echo $this->renderContentPartial($model, '_grid', array('model' => $model, 'channel' => $channel)); ?>
		</div>
	</div>
</div>
